/*
 * package com.sinven.controller;
 * 
 * import java.util.List;
 * 
 * import org.springframework.beans.factory.annotation.Autowired; import
 * org.springframework.stereotype.Controller; import
 * org.springframework.ui.Model; import
 * org.springframework.web.bind.annotation.RequestMapping; import
 * org.springframework.web.bind.annotation.RequestMethod;
 * 
 * import com.sinven.pojo.Comment; import com.sinven.pojo.Pager; import
 * com.sinven.service.CommentService;
 * 
 * @Controller
 * 
 * @RequestMapping(value = "/user", method = RequestMethod.GET) public class
 * PageController {
 * 
 * @Autowired CommentService commentService;
 * 
 * @Autowired Pager p;
 * 
 * @RequestMapping(value = "/page", method = RequestMethod.GET) public String
 * findUsersByPage(int page, Model model) { try {
 * p.setTotalUsers(commentService.findUsers().size()); p.setCurrentPage(page);
 * List<Comment> list = commentService.findUsersByPage((page - 1) *
 * p.getPageSize(), p.getPageSize()); // 查询结果是list集合 model.addAttribute("list",
 * list); model.addAttribute("page", p); return "home"; } catch (Exception e) {
 * model.addAttribute("message", "未能获取数据"); return "message"; } } }
 */